#include "character.h"
#include "item.h"
#include "navigation.h"
#include "cardmanage.h"
#include "BasicGameCard.h"


void 
CBasicGameCard::Init()
{
	c[0] = CCharacter("Lady", 4, 7, 1);
	c[1] = CCharacter("Sir", 5, 6, 2);
	c[2] = CCharacter("Captain", 7, 4, 3);
	c[3] = CCharacter("FirstMate", 8, 3, 4);
	c[4] = CCharacter("French", 6, 5, 5);
	c[5] = CCharacter("Child", 3, 8, 6);

	n[0] = CNavigation(CNavigation::HasBird, 1, 1);
	n[1] = CNavigation(CNavigation::NoBird, 1, 0) ;
	n[2] = CNavigation(CNavigation::NoBird, 0, 1) ;
	n[3] = CNavigation(CNavigation::HasBird, 0, 0) ;
	n[4] = CNavigation(CNavigation::RemoveBird, 0, 0) ;

	i[0] = CItem("Compass");
	i[1] = CItem("Gun");
	i[2] = CItem("Umbrella");
	i[3] = CItem("FirstAid");
	i[4] = CItem("Oar");
	i[5] = CItem("Buoy");
	for (int a = 6; a <= 15; a++)
	{
		i[a] = CItem("Kettle"); 
	}
	for (int a = 16; a <= 25; a++)
	{
		i[a] = CItem("Money"); 
	}

	for (int a = 0; a <= 5; a++)
		BasicCharacters.push_back(&c[a]);

	for (int a = 0; a <= 4; a++)
		BasicNavigations.push_back(&n[a]);

	for (int a = 0; a <= 25; a++)
		BasicItems.push_back(&i[a]);

	BasicCharacters.AssignIndex();
	BasicNavigations.AssignIndex();
	BasicItems.AssignIndex();

	n[0].AddOverBoardEveryone(BasicCharacters);
	n[0].AddThirstyEveryone(BasicCharacters);
	n[2].AddOverBoard(&c[2]);
	n[2].AddThirsty(&c[3]);
	n[3].AddOverBoardExcept(BasicCharacters, &c[0]);
	n[3].AddThirstyExcept(BasicCharacters, &c[1]);
	n[4].AddOverBoard(&c[4]);
	n[4].AddThirsty(&c[2]);
	n[4].AddThirsty(&c[5]);

	BasicPosition = BasicCharacters;
}